 <?php
  require_once('inc_admin.php');

  connect();
  //编写sql语句
   $sql = 'select * from category';
 
  $cat_list = fetch_array($sql); 

 ?>
<!doctype html>
<html>
 <head>
  <meta charset="UTF-8">
  <title添加家具</title>
 </head>
 <body>
  <form method=post action="doadd.php" enctype="multipart/form-data" >
  <table  border="1">
  <tr>
  <td>家具名称：</td>   
  <td><input type="text" name="wfx_name" required>  </td>
  </tr>
  <tr>
  <td>所属类别：</td>
  <td>   
  <select name="wfx_cid">
      <option>==请选择==</option>
      <!-- <option value="1">熊猫</option> -->
      <?php
        foreach($cat_list as $one)
        {
          echo '<option value="'.$one['wfx_cid'].'">'.$one['wfx_cname'].'</option>';
        }
      ?>
    </select>
  </td>
  </tr>
  <tr>
  <td>产地</td>   
  <td><input type="text" name="wfx_brand">
  </td>
  </tr>
   <tr>
  <td>上传图片</td> 
  <td>
   <input type="file" class="form-control" id="wfx_jiajulink"  name="wfx_jiajulink">
  </td>
  </tr>  
  <tr>
  <td>照片介绍</td>   
  <td>
  <textarea name="wfx_intro">照片介绍：</textarea>
  </td>
  </tr>
  <tr>
  <td colspan="2">
  <input type="submit" value="添加">
  </td>
  </tr>
 </table>
 </form>
 </body>
</html>